package singleton;

/**
 * @Author: 80305082
 * @Date: 2021/3/22
 * @Description: 静态内部类
 */
public class Singleton02 {

    private Singleton02() {
    }

    // 静态内部类
    private static class SingletonFactory {
        private static Singleton02 instance = new Singleton02();
    }

    public static Singleton02 getInstance() {
        return SingletonFactory.instance;
    }
}
